package com.gameapplet.item.controller;

import com.gameapplet.item.model.Item;
import com.gameapplet.item.service.Impl.ItemServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/item")
public class ItemController {
    @Resource(name ="itemService")
    ItemServiceImpl itemService;

    @RequestMapping("/getItem")
    @ResponseBody
    public List<Item> getItem(){
        List<Item> item = itemService.selectByQuestionId("9196229fc790432fa3b6601e7e81");
        return item;
    }

}
